home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / PowerPlant / Everything / CModalStuff.h < prev    next >
Encoding:
Text File  |  1998-10-11  |  1.8 KB  |  72 lines  |  [TEXT/CWIE]

  1. // CModalStuff.h -- dialog class
  2.  
  3. #pragma once
  4.  
  5. #include <LGADialog.h>
  6.  
  7. #include "DModalStuffData.h"
  8.  
  9. class LStream;
  10.  
  11. class LPushButton;
  12. class CControlPane;
  13. class LTextGroupBox;
  14. class LPopupButton;
  15. class LTextTableView;
  16.  
  17.  
  18. //----------
  19. class CModalStuff : public LGADialog {
  20. public:    // these comprise the programming interface for using the dialog
  21.     static    CModalStuff*        CreateModalStuff        (LCommander*    inSuperCommander,
  22.                                                  CommandT        inCommand,
  23.                                                  DModalStuffData*        inData);
  24.     virtual void        SetFromData        (DModalStuffData*        inData);
  25.     virtual DModalStuffData*        GetData ();
  26.  
  27. // these functions will be obsoleted
  28. // retained only for backwards compatibility
  29.     virtual Boolean        GetToolsChoice();
  30.     virtual void        SetToolsChoice        (Int32        inChoice);
  31.     virtual short        GetFromValuesList2PopupChoice();
  32.     virtual void        SetFromValuesList2PopupChoice        (short        choice);
  33.     virtual short        GetFromMenuPopupChoice();
  34.     virtual void        SetFromMenuPopupChoice        (short        choice);
  35.  
  36.  
  37. public:    // these comprise the implementation
  38.     enum { class_ID = 'Modf' };
  39.  
  40.                         CModalStuff        (LStream*    inStream);
  41.     virtual                ~CModalStuff();
  42.  
  43.     virtual void        ListenToMessage        (MessageT    inMessage,
  44.                                              void        *ioParam);
  45.  
  46.     virtual Boolean        ObeyCommand            (CommandT    inCommand,
  47.                                              void        *ioParam = nil);
  48.     virtual void        FindCommandStatus    (CommandT    inCommand,
  49.                                              Boolean    &outEnabled,
  50.                                              Boolean    &outUsesMark,
  51.                                              Char16        &outMark,
  52.                                              Str255        outName);
  53.  
  54. protected:
  55.     static    void        RegisterClass();
  56.     virtual void        FinishCreateSelf();
  57.     virtual void        DataChanged        (long        inDataID);
  58.  
  59. protected:
  60.     static Boolean        sIsRegistered;
  61.     CommandT            mCommand;
  62.  
  63.     LPushButton*        mOKButton;
  64.     CControlPane*        mToolsPalette;
  65.     LPopupButton*        mFromValuesList2Popup;
  66.     LPopupButton*        mFromMenuPopup;
  67.     LTextTableView*        mTextListTable;
  68.  
  69.     DModalStuffData*        mData;
  70.  
  71. };
  72.